# @Time : 2025/3/1 13:10
# @Author : Fioman 
# @Phone : 13149920693
"""
工单模型对象,从mes那边获取到的order信息,然后根据这个order信息,要去分发给分班线和裁磨线
"""


class CutOrder:
    def __init__(self, orderId, lotNum, layerName, planCount, width, height):
        """
        分班线的工单需要的信息
        """
        self.orderId = orderId
        self.lotNum = lotNum
        self.layerName = layerName
        self.planCount = planCount
        self.width = width
        self.height = height


class GrindOrder:
    """
    裁磨线工单下发数据模型
    """

    def __init__(self):
        """
        裁磨工单下发数据模型
        """
        self.orderId = None
        self.lotNum = None
        self.lenY = None
        self.widthX = None
        self.holeDisX = None
        self.centerDisZ = None
        self.thickness = None
        self.thicknessSe = None
        self.isEdge = None
        self.isCircle = None
        self.planCount = None
        self.isDirectionHole = None
        self.disC0 = None
        self.disF0 = None

    def __str__(self):
        showInfo = (f"配方: {self.orderId},批号:{self.lotNum},板长Y:{self.lenY},板宽X:{self.widthX},"
                    f"孔距X:{self.holeDisX},中心孔靶距Y:{self.centerDisZ},板厚:{self.thickness},"
                    f"板厚公差:{self.thicknessSe},磨边选择:{self.isEdge},圆角选择:{self.isCircle},"
                    f"计划数量:{self.planCount},是否有方向孔:{self.isDirectionHole},方向孔C0:{self.disC0},"
                    f"方向孔F0:{self.disF0})")
        return showInfo
